/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.component;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import com.qihoo.gamecenter.sdk.common.d.a.a;
import com.qihoo.gamecenter.sdk.common.i.s;
import com.qihoo.gamecenter.sdk.pay.c;

public class PayUnfixHeader extends APayWidget implements View.OnClickListener {
    public static final int c = com.qihoo.gamecenter.sdk.pay.b.F.ordinal();
    public static final int d = com.qihoo.gamecenter.sdk.pay.b.G.ordinal();
    private TextView e;
    private com.qihoo.gamecenter.sdk.pay.k.a f;

    public PayUnfixHeader(Context paramContext) {
        super(paramContext);
        setGravity(15);
    }

    public void a(int paramInt) {
        removeAllViews();
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(s.b(this.mContext, 20.0F), s.b(
                this.mContext, 22.0F));
        localLayoutParams.addRule(11);
        localLayoutParams.addRule(10);
        localLayoutParams.rightMargin = s.b(this.mContext, 10.0F);
        ImageView localImageView = new ImageView(getContext());
        localImageView.setId(c);
        localImageView.setLayoutParams(localLayoutParams);
        this.b.a(localImageView, 1073741924);
        localImageView.setOnClickListener(this);
        addView(localImageView);
        localLayoutParams = new RelativeLayout.LayoutParams(-2, s.b(this.mContext, 22.0F));
        localLayoutParams.addRule(9);
        this.e = new TextView(getContext());
        this.e.setId(d);
        this.e.setGravity(16);
        this.e.setLayoutParams(localLayoutParams);
        this.e.setTextSize(1, s.a(getContext(), 13.3F));
        this.e.setTextColor(-11842745);
        this.e.setPadding(0, 0, 0, 0);
        addView(this.e);
    }

    public void setExchangeTips(c paramc, long paramLong, String paramString, float paramFloat)
  {
    long l1 = Math.max(paramLong / 100L, 0L);
    long l2 = ()(((paramFloat > 0.0F) ? paramFloat : paramc.j()) * (float)l1);
    if ("360bi".equalsIgnoreCase(paramc.d()))
      this.e.setText(l1 + com.qihoo.gamecenter.sdk.common.d.a.a(a.a.aJ) + l2 + paramString);
    else
      this.e.setText(l1 + com.qihoo.gamecenter.sdk.common.d.a.a(a.a.aK) + l2 + paramString);
  }

    public void setSelectTips(c paramc) {}

    public void onClick(View paramView) {
        if (this.f == null)
            return;
        this.f.a(65281, paramView, new Object[0]);
    }

    public void a(com.qihoo.gamecenter.sdk.pay.k.a parama) {
        this.f = parama;
    }
}